<?php
class ZluykesController extends AppController {
	var $name = 'Zluykes';
	var $helpers = array('Html', 'Form');
    var $uses=array('Zluyke','Kehoach');

	function index($tg,$id_dv) {
		$this->Zluyke->recursive = 0;
		$this->set('zluykes', $this->paginate(array('thoigian_id'=>$tg,'donvi_id'=>$id_dv)));
        $kh=$this->Kehoach->find('first',array(
                'conditions'=>array('Kehoach.donvi_id'=>$id_dv),'recursive'=>0));
        $this->set(compact('kh','id_dv','tg'));
	}
    function excel($tg,$id_dv) {
        $this->layout='';
		$this->Zluyke->recursive = 0;
		$this->set('zluykes', $this->paginate(array('thoigian_id'=>$tg,'donvi_id'=>$id_dv)));
        $kh=$this->Kehoach->find('first',array(
                'conditions'=>array('Kehoach.donvi_id'=>$id_dv),'recursive'=>0));
        $this->set(compact('kh','id_dv'));
	}
}
?>